package org.ecpkn.PAGridSim.core.gridsimEntity.policy.paPolicy.concretePolicy.EDFPreemptablePAPolicy;

import gridsim.ResGridlet;

import java.util.Comparator;

import org.ecpkn.PAGridSim.core.gridsimEntity.policy.paPolicy.preemptable.PartitionPreemptablePAPolicy;
import org.ecpkn.PAGridSim.core.gridsimEntity.policy.paPolicy.priority.EDF.EDF;

/**
 * @author Lin Zhou
 * 
 *         This class extends PartitionPreemptablePAPolicy, the schedule policy
 *         is based on EDF
 */
public class EDFPartitionPreemptablePAPolicy extends
		PartitionPreemptablePAPolicy implements EDF{
	// TODO: manage 2 cores in a machine

	public EDFPartitionPreemptablePAPolicy(String resourceName,
			String policyName) throws Exception {
		super(resourceName, policyName);
	}

	@Override
	public Comparator<ResGridlet> getPriorityComparator() {
		return EDF.comparator;
	}
}
